(function (root, factory) {
    //异步模块加载机制
    if (typeof exports === 'object' && typeof module === 'object') {
        module.exports = factory();
    } else {
        root.Slider = factory();//window绑定Slider
    }
})(this, function () {
    function SliderNav() {
    };
    //侧边导航展示
    SliderNav.prototype = {
        //初始化调用---
        init: function (options) {
            this.eventPage(options.el, options.linkPath);
        },
        //点击切换页面
        eventPage: function (element, callback) {
            $(element).find("li").on("click", function () {


                $(element).find("li").removeClass("active");
                $(this).addClass("active").siblings().removeClass("active");
                $(this).find("span.san").toggleClass("active");

                var link = $(this).find("a").attr("link");

                callback && callback(link);

                if ($(this).hasClass("slide_menu")) {
                    $(this).next().stop().slideToggle();
                }

            })
        }
    }
    return new SliderNav();
})


//右侧滑动导航---
Slider.init({
    el: ".page_left",
    linkPath: function (link) {
        if (link != null && link != "") {
            console.log(base.basePath + link)
            index_js.loadRightPage(link);
        }
    }
})
;



